package com.itheima.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.groups.Default;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import java.time.LocalDateTime;

@Data
public class Pet {
    @NotNull(groups = Update.class)
    private Integer id;//主键ID
    @URL
    private String img;//分类名称
    @NotEmpty
    private String name;//分类别名
    private String sex;//创建人ID
    private Integer age;
    private String type;
    private String status;
    private String descr;
    private String createUser;
    private Integer weight;
    private String species;


    //如果说某个校验项没有指定分组，默认属于Default分组
    //分组之间可以继承，A extends B 那么A中拥有B中所有的校验项
    public interface Add extends Default {

    }
    public interface Update extends Default{

    }
}
